

var WxParse = require('../../../js/wxParse/wxParse.js');
const requestMode = require('../../../js/requestsMode.js');
const session = require('../../../js/session.js');
const  Tools = require('../../../js/Tools.js');
Page({
    data:{},
    onLoad:function(){
        let that =  this;
        WxParse.emojisInit('[]', "../../../js/wxParse/emojis/", {
            "00": "00.gif",
            "01": "01.gif",
            "02": "02.gif",
            "03": "03.gif",
            "04": "04.gif",
            "05": "05.gif",
            "06": "06.gif",
            "07": "07.gif",
            "08": "08.gif",
            "09": "09.gif",
            "10": "10.gif",
            "11": "11.gif",
            "12": "12.gif",
            "13": "13.gif",
            "14": "14.gif",
            "15": "15.gif",
            "16": "16.gif",
            "17": "17.gif",
            "18": "18.gif",
            "19": "19.gif"
        });
        Tools.showLoaddingToast('加载中...');
        requestMode.sendRequest('member/platform-rule','POST',{},{sKey:session.get('sKey')}).then(function (successResponse) {
            let code = successResponse.data.code;
            if(code == 200 ){
                let content = successResponse.data.data.content;
                WxParse.wxParse('article', 'html', content, that, 5);
                Tools.hideLoaddingToast();
            }else{
                Tools.hideLoaddingToast();
                Tools.showErrorToast(successResponse.data.message);
            }
        },function(error){
            Tools.hideLoaddingToast();
            Tools.showWrongNetWorkToast();
        });

    }
});